Welcome to ‘Comparison of Monolith
vs. SOA vs. Microservices’. After watching this video, you will be able to define Monolith implementation, define Service Oriented Architecture (SOA), and define Microservices. A monolithic application has all or most of
its functionality within a single process. And the application is managed
in internal layers or libraries. These layers could be for security, reporting, analytics,
user interface, or data access. The layers are tightly
connected and dependent on each other. And this is where the benefits of
a monolithic design lie; in its simplicity and less cross-cutting of features and functionalities
since everything is in the same code base. However, over time,
most products develop and increase in scope, and the design becomes more
complex and difficult to modify. It also becomes a barrier to
adapting to new technology which would mean re-writing the whole application. A Windows Forms Application
is a typical example of a Monolithic design. Here we embed the user interface,
business logic, and data access, all inside one codebase
which forms the whole application. And only the database
is outside the scope. A Service Oriented Architecture
(SOA) is designed and built with a service provider and consumer approach. The services provided work as a
discrete unit of functionality, integrated seamlessly, and are easily reused. Each SOA service consists of three components. The interface defines how a service provider
will execute requests from a service consumer, the contract defines how the service provider
and service consumer should interact, and the implementation is the service code. The benefits of having these three
separate components are that they help increase reliability and support parallel development due to a
fixed contract between the services. However, due to these
expectations and requirements, an SOA design can become complex and
obstruct rapid application development. And the SOA design is an expensive
investment, and therefore usually only suits enterprise teams, who can invest
the required resources and expertise. SOA is an enterprise-wide concept.
An example would be a banking system. It enables existing applications to be
exposed over loosely coupled interfaces, each corresponding to a business
function that enables applications, in one part of an extended enterprise, to
reuse functionality in other applications. Each interface of the bank provides
services to accomplish its responsibility. Like SOA, microservices architectures
comprise loosely coupled, reusable, and specialized components that often
work independently of one another. And even the data in a microservice
is not shared with other services, which helps you to scale individual microservices independently, and being independent also means you have the
liberty to select the underlying technology. This architecture provides benefits such as ease of development, where you can define
individual work units as a service. And since each service has
a designated responsibility, you have the flexibility to add new technology. But while there is a compelling
case for using microservices, there are some challenges associated with it too. The first one is the security aspect. Now that you have so many different
services independently hosted, each will need its own security paradigm. For example, a simple requirement, such as transport layer security (or
TLS), to secure network communications. And the second is that debugging and
isolating issues can also become harder, since each service runs independently, meaning you
may find it challenging to locate the root cause. Microservices architecture is
an application-scoped concept. For example, an e-commerce application can have separate microservices to process
orders, security, and analytics. A microservices design enables the internals
of a single application to be broken up into smaller pieces that can be independently
changed, scaled, and administered. However, it does not define how
applications talk to one another. In this video, you learned that monolithic design is
interconnected and interdependent, SOA design provides seamless
integration and reusability, and Microservices architecture gives you
targeted scalability and flexibility.